package com.ashley.thread.Exer;

/**
 * @author ashley
 * @date 2019/9/26-22:46
 */
public class Run {
    public static void main(String[] args) {
        try {
            ThreadTest thread = new ThreadTest();
            thread.setName("MyThread");
            thread.start();
            for (int i = 0; i < 10; i++) {
                int time = (int) (Math.random() * 1000);
                Thread.sleep(time);
                System.out.println("run=" + Thread.currentThread().getName());
            }

        } catch (InterruptedException e) {
            e.printStackTrace();
        }
    }
}
